﻿using System;

namespace Yaml.Presentation.Tokens {
    public class YamlDirectiveToken : Token {
        private string major;
        private string minor;

        public YamlDirectiveToken(Mark start, Mark end, string major, string minor)
            : base(start, end) {
            this.major = major;
            this.minor = minor;
        }

        public string MajorVersion {
            get { return this.major; }
        }
        public string MinorVersion {
            get { return this.minor; }
        }
        public string Version {
            get { return this.major + "." + this.minor; }
        }

        public override String ToString() {
            return "#<" + this.GetType().Name + " version='" + Version + "' start=" + Start.ToString() + " end=" + End.ToString() + ">";
        }

    }
}